<%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Adjustments' } %>

<% admin_breadcrumb(plural_resource_name(Spree::Adjustment)) %>

<% content_for :page_actions do %>
  <% if can? :create, Spree::Adjustment %>
    <li>
      <%= button_link_to Spree.t(:new_adjustment), new_admin_order_adjustment_url(@order) %>
    </li>
  <% end %>
<% end %>

<%= render :partial => 'adjustments_table' %>

<% if @order.can_add_coupon? %>
  <div data-hook="adjustments_new_coupon_code">
    <%= text_field_tag "coupon_code", "", :placeholder => Spree.t(:coupon_code) %>
    <%= button Spree.t(:add_coupon_code), nil, 'submit', :id => "add_coupon_code" %>
  </div>
<% end %>
<%= javascript_tag do -%>
  var order_number = '<%= @order.number %>';
<% end -%>
